package com.ruoyi.rest;

import com.alibaba.fastjson.JSON;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.SysOperLog;
import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysOperLogService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 操作日志记录
 *
 * @author ruoyi
 */
@RestController
@RequestMapping("/api")
public class SysOperlogRest
{
    private String prefix = "monitor/operlog";

    @Autowired
    private ISysDeptService deptService;

    @PostMapping("/list")
    @ResponseBody
    public List<SysDept> list(@RequestBody SysDept dept)
    {
        List<SysDept> deptList = deptService.selectDeptList(dept);
        System.out.println(JSON.toJSON(deptList));
        return deptList;
    }

}
